<div class="vheader">
    <h1><?php echo $this->Officers->d->FullName ?></h1>
    <p><?php echo $this->translate("Loan officer") ?>
</div>

<div class="vcontent_vfooter2">
    
    <img class="shadow" src="/default/photo/full/cat/u/id/<?php echo $this->Officers->d->OfficerUserId ?>/pf/<?php echo $this->Officers->p->c->score ?>" />
        
    <div class="cell dd120">
        <dl>
            <dt><?php echo $this->translate("Name") ?></dt>
            <dd><?php echo $this->Officers->d->FullName ?></dd>
            <dt><?php echo $this->translate("Status") ?></dt>
            <dd><?php echo $this->Officers->d->Status ?></dd>
            <dt><?php echo $this->translate("Username") ?></dt>
            <dd><?php echo $this->Officers->d->Username ?></dd>
            <dt><?php echo $this->translate("Email") ?></dt>
            <dd><?php echo $this->Officers->d->Email ?></dd>
            <dt><?php echo $this->translate("Branch") ?></dt>
            <dd><?php echo $this->link('/admin/location/view',array('id'=>$this->Officers->d->LocationId),$this->Officers->d->Location) ?>
                    <br /><?php echo $this->Officers->d->LocationPhone ?></dd>
            <dt><?php echo $this->translate("Mobile") ?></dt>
            <dd><?php echo $this->Officers->d->MobilePhone ?></dd>
            <dt><?php echo $this->translate("GovCode") ?></dt>
            <dd><?php echo $this->Officers->d->GovCode ?></dd>
            <dt><?php echo $this->translate("Birthdate") ?></dt>
            <dd><?php echo $this->Officers->d->Birthdate ?></dd>
        </dl>
    </div>
    
    <?php if(isset($this->Officers->p->Score)): ?>

    <div class="cell dt200">
        <dl>
            <dt><li class="<?php echo $this->Officers->p->c->Clients ?>"><?php echo $this->translate("Clients") ?></dt>
            <dd><?php echo (int) $this->Officers->p->Clients ?></dd>
            <dt><li class="<?php echo $this->Officers->p->c->FemalePercentage ?>"><?php echo $this->translate("Female percentage") ?></dt>
            <dd><?php echo $this->Officers->p->FemalePercentage ?></dd>
            <dt><li class="<?php echo $this->Officers->p->c->BalancePrincipal ?>"><?php echo $this->translate("Balance") ?></dt>
            <dd><?php echo number_format($this->Officers->p->BalancePrincipal, 2, '.', ',') ?></dd>
            <dt><li class="<?php echo $this->Officers->p->c->Par15 ?>"><?php echo $this->translate("PAR 15") ?></dt>
            <dd><?php echo $this->Officers->p->Par15 ?></dd>
            <dt><li class="<?php echo $this->Officers->p->c->WriteOffPercentage ?>"><?php echo $this->translate("Write-off percentage") ?><sup>1</sup></dt>
            <dd><?php echo $this->Officers->p->WriteOffPercentage ?></dd>
            <dt><li class="<?php echo $this->Officers->p->c->Interest ?>"><?php echo $this->translate("Op. income") ?><sup>1</sup></dt>
            <dd><?php echo number_format($this->Officers->p->Interest, 2, '.', ',') ?></dd>
            <dt><li class="<?php echo $this->Officers->p->c->Disbursements ?>"><?php echo $this->translate("Disbursements") ?><sup>1</sup></dt>
            <dd><?php echo (int) $this->Officers->p->Disbursements ?></dd>
            <dt><li class="<?php echo $this->Officers->p->c->DisbursedAmount ?>"><?php echo $this->translate("Disbursed amount") ?><sup>1</sup></dt>
            <dd><?php echo number_format($this->Officers->p->DisbursedAmount, 2, '.', ',') ?></dd>    
        </dl>
    </div>

    <div class="cell dt200">
        <dl>
            <dt><li class="<?php echo $this->Officers->p->c->Meetings ?>"><?php echo $this->translate("Bank meetings with leaders") ?></dt>
            <dd><?php echo (int) $this->Officers->p->Meetings ?></dd>
            <dt><li class="<?php echo $this->Officers->p->c->ClientAssistance?>"><?php echo $this->translate("Client assistance") ?><sup>2</sup></dt>
            <dd><?php echo (int) $this->Officers->p->ClientAssistance ?></dd>
            <dt><li class="<?php echo $this->Officers->p->c->PersonalGrowth ?>"><?php echo $this->translate("Personal growth") ?><sup>2</sup></dt>
            <dd><?php echo (int) $this->Officers->p->PersonalGrowth ?></dd>
            <dt><li class="<?php echo $this->Officers->p->c->ChurchMinistry ?>"><?php echo $this->translate("Church ministry") ?><sup>2</sup></dt>
            <dd><?php echo (int) $this->Officers->p->ChurchMinistry ?></dd>
            <dt><li class="<?php echo $this->Officers->p->c->Training ?>"><?php echo $this->translate("Client training") ?><sup>2</sup></dt>
            <dd><?php echo (int) $this->Officers->p->Training ?></dd>
            <dt><sup>1</sup> <?php echo $this->translate("Previous 30 days") ?></dt><dd></dd>
            <dt><sup>2</sup> <?php echo $this->translate("Surplus monthly hours") ?></dt><dd></dd>
        </dl>
        <div class="scoreLabel"><?php echo $this->translate("Score") ?></div>
        <div class="scoreBadge">
            <div id="score" class="<?php echo $this->Officers->p->c->Score ?>"><?php echo $this->Officers->p->Score; ?></div>
        </div>
    </div>
    
    <?php endif; ?>
    
</div>

<div class="vfooter3">
 <div class="menu">
     <a style="text-decoration: none"><?php echo $this->translate("Loan applications:") ?></a>
     <?php echo $this->link('/loan/application/browse', array('OfficerUserId'=>$this->Officers->d->OfficerUserId,'OfficerUsername'=>$this->Officers->d->Username,'Status'=>'New'),$this->translate("New"),array('target' => 'bottom', 'text' => true)) ?>
     <?php echo $this->link('/loan/application/browse', array('OfficerUserId'=>$this->Officers->d->OfficerUserId,'OfficerUsername'=>$this->Officers->d->Username,'Status'=>'Rejected'),$this->translate("Rejected"),array('target' => 'bottom', 'text' => true)) ?>
     <?php echo $this->link('/loan/loan-master/browse', array('OfficerUserId'=>$this->Officers->d->OfficerUserId,'OfficerUsername'=>$this->Officers->d->Username,'Status'=>'Submitted'),$this->translate("Submitted"),array('target' => 'bottom', 'text' => true)) ?>
     <?php echo $this->link('/loan/loan-master/browse', array('OfficerUserId'=>$this->Officers->d->OfficerUserId,'OfficerUsername'=>$this->Officers->d->Username,'Status'=>'Re-Submitted'),$this->translate("Re-Submitted"),array('target' => 'bottom', 'text' => true)) ?>
     <?php echo $this->link('/loan/loan-master/browse', array('OfficerUserId'=>$this->Officers->d->OfficerUserId,'OfficerUsername'=>$this->Officers->d->Username,'Status'=>'Reviewed'),$this->translate("Reviewed"),array('target' => 'bottom', 'text' => true)) ?>
     <?php echo $this->link('/loan/loan-master/browse', array('OfficerUserId'=>$this->Officers->d->OfficerUserId,'OfficerUsername'=>$this->Officers->d->Username,'Status'=>'Approved'),$this->translate("Approved"),array('target' => 'bottom', 'text' => true)) ?>
     <?php echo $this->link('/loan/loan-master/browse', array('OfficerUserId'=>$this->Officers->d->OfficerUserId,'OfficerUsername'=>$this->Officers->d->Username,'Status'=>'Executed'),$this->translate("Executed"),array('target' => 'bottom', 'text' => true)) ?>
     <?php echo $this->link('/loan/loan-master/browse', array('OfficerUserId'=>$this->Officers->d->OfficerUserId,'OfficerUsername'=>$this->Officers->d->Username,'Status'=>'Disbursed'),$this->translate("Disbursed"),array('target' => 'bottom', 'text' => true)) ?>
     <?php echo $this->link('/loan/loan-master/browse', array('OfficerUserId'=>$this->Officers->d->OfficerUserId,'OfficerUsername'=>$this->Officers->d->Username,'Status'=>'Withdrawn'),$this->translate("Withdrawn"),array('target' => 'bottom', 'text' => true)) ?>
 </div>
</div>

<div class="vfooter2">
 <div class="menu">
     <?php echo $this->link('/loan/active-loan/browse', array('OfficerUserId'=>$this->Officers->d->OfficerUserId,'OfficerUsername'=>$this->Officers->d->Username),$this->translate("Active loans"),array('target' => 'bottom', 'text' => true)) ?>
     <?php echo $this->link('/loan/active-loan/browse', array('OfficerUserId'=>$this->Officers->d->OfficerUserId,'Status'=>'Delinquent','Delinquent'=>'1','OfficerUsername'=>$this->Officers->d->Username),$this->translate("Delinquent loans"),array('target' => 'bottom', 'text' => true)) ?>
     <?php echo $this->link('/loan/legal/browse', array('OfficerUserId'=>$this->Officers->d->OfficerUserId,'Status'=>'Written-Off','OfficerUsername'=>$this->Officers->d->Username),$this->translate("Written-Off loans"),array('target' => 'bottom', 'text' => true)) ?>
     <?php echo $this->link('/loan/legal/browse', array('OfficerUserId'=>$this->Officers->d->OfficerUserId,'Status'=>'Recovered','OfficerUsername'=>$this->Officers->d->Username),$this->translate("Recovered loans"),array('target' => 'bottom', 'text' => true)) ?>
     <?php echo $this->link('/loan/loan/browse', array('OfficerUserId'=>$this->Officers->d->OfficerUserId,'Status'=>'Paid','OfficerUsername'=>$this->Officers->d->Username),$this->translate("Paid loans"),array('target' => 'bottom', 'text' => true)) ?>
     |
     <?php echo $this->link('/admin/client/browse', array('OfficerUserId'=>$this->Officers->d->OfficerUserId,'OfficerUsername'=>$this->Officers->d->Username),$this->translate("Clients"),array('target' => 'bottom', 'text' => true)) ?> 
     <?php echo $this->link('/admin/group/browse', array('OfficerUserId'=>$this->Officers->d->OfficerUserId,'OfficerUsername'=>$this->Officers->d->Username),$this->translate("Groups"),array('target' => 'bottom', 'text' => true)) ?> 
     <?php echo $this->link('/admin/bank/browse', array('OfficerUserId'=>$this->Officers->d->OfficerUserId,'OfficerUsername'=>$this->Officers->d->Username),$this->translate("Banks"),array('target' => 'bottom', 'text' => true)) ?> 
     |
     <?php echo $this->link('/admin/client/add', array('officer'=>$this->Officers->d->OfficerUserId),$this->translate("Add new client"),array('text' => true)) ?>      
     <?php echo $this->link('/admin/bank/add', array('officer'=>$this->Officers->d->OfficerUserId),$this->translate("Add new bank"),array('text' => true)) ?>      
 </div>
</div>

<div class="vfooter">
 <div class="menu">
     <?php echo $this->link('/admin/performance-metric-officer/browse', array('OfficerUserId'=>$this->Officers->d->OfficerUserId,'Username'=>$this->Officers->d->Username),$this->translate("Custom metrics"),array('target' => 'bottom', 'text' => true)) ?>
     <?php echo $this->link('/admin/performance-metric-officer/add', array('OfficerUserId'=>$this->Officers->d->OfficerUserId),$this->translate("Add custom metric"),array('text' => true)) ?>
     <?php echo $this->link('/admin/performance-data/browse', array('OfficerUserId'=>$this->Officers->d->OfficerUserId,'Username'=>$this->Officers->d->Username),$this->translate("Performance data"),array('target' => 'bottom', 'text' => true)) ?>
     <?php echo $this->link('/admin/officer/performance-chart', array('id'=>$this->Officers->d->OfficerUserId),$this->translate("Performance charts")) ?>
     |
     <?php echo $this->link('/admin/performance-data-xtra/officer', array('id'=>$this->Officers->d->OfficerUserId),$this->translate("Update performance"),array('text' => true)) ?>
     |
     <?php echo $this->link('/admin/officer/map', array('id'=>$this->Officers->d->OfficerUserId),$this->translate("Map"),array('text' => true)) ?>
 </div>
</div>

<!-- Tooltips -->
<div data-dojo-type="dijit.Tooltip" data-dojo-props="connectId:'score',position:['below']">
    <?php echo $this->translate("Performance score") ?>
</div>
<!-- Tooltips /-->

<!-- Context menu /-->
<!--
<div data-dojo-type="dijit.Menu" id="windowContextMenu" data-dojo-props="contextMenuForWindow:true" style="display: none;">    
    <div data-dojo-type="dijit.MenuItem" data-dojo-props="iconClass:'',
        onClick:function(){parent.bottom.location.href='/admin/client/browse/par1/OfficerUserId/val1/<?php echo $this->data['UserId'] ?>'}">Clients</div>
    <div data-dojo-type="dijit.MenuItem" data-dojo-props="iconClass:'',
        onClick:function(){parent.bottom.location.href='/admin/group/browse/par1/OfficerUserId/val1/<?php echo $this->data['UserId'] ?>'}">Groups</div>
    <div data-dojo-type="dijit.MenuSeparator"></div>
    <div data-dojo-type="dijit.PopupMenuItem">
        <span>Formalization</span>
        <div data-dojo-type="dijit.Menu" id="submenu1">
            <div data-dojo-type="dijit.MenuItem" data-dojo-props="iconClass:'', onClick:function(){alert('Submenu 1!')}">New</div>
            <div data-dojo-type="dijit.MenuItem" data-dojo-props="onClick:function(){alert('Submenu 1!')}">Open</div>
            <div data-dojo-type="dijit.MenuItem" data-dojo-props="onClick:function(){alert('Submenu 2!')}">Revised</div>
            <div data-dojo-type="dijit.MenuItem" data-dojo-props="onClick:function(){alert('Submenu 2!')}">Approved</div>
            <div data-dojo-type="dijit.MenuItem" data-dojo-props="onClick:function(){alert('Submenu 2!')}">Disbursed</div>
        </div>
    </div>
    <div data-dojo-type="dijit.PopupMenuItem">
        <span>Popup of something other than a menu</span>
        <div data-dojo-type="dijit.ColorPalette"></div>
    </div>
</div>
-->
<!-- Context menu /-->